<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Singleton{
            constructor(name,age){
                if(!Singleton.instance){
                    this.name = name
                    this.age =age 
                    Singleton.instance = this
                }

                return Singleton.instance
            }

            a(){

            }

            b(){
                
            }
        }

        // new Singleton("kerwin",100) === new Singleton("xiaoming",18)

        
    </script>
</body>
</html>